package com.other.servlet;

import com.other.server.Request;
import com.other.server.Response;

import java.io.IOException;

public abstract class Servlet {

    public void doService(Request request,Response response) throws IOException {
        if(request.getMethod().equals("GET")){
            doGet(request,response);
        }else {
            doPost(request,response);
        }
    }

    public abstract void  doPost(Request request, Response response);

    public abstract void doGet(Request request,Response response);
//
}
